<template>
  <div id="app" @dblclick="goFullScreen">
    <div class="content">
      <router-view/>
    </div>
  </div>
</template>

<script setup>
function goFullScreen() {
  const el = document.documentElement       // 或 document.getElementById('app')
  if (el.requestFullscreen) {
    el.requestFullscreen()                  // 标准浏览器
  } else if (el.webkitRequestFullscreen) {
    el.webkitRequestFullscreen()             // Safari
  } else if (el.msRequestFullscreen) {
    el.msRequestFullscreen()                  // IE11
  }
}
</script>

<style>
html, body, #app {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.content {
  width: 100%;
  height: 100%;
  background-color: #0a1f3d;
}
</style>
